package bold.deposit.useful.spring;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;

@Service
public class InitSpring implements InitializingBean {

    public InitSpring() {
        System.out.println("构造方法");
    }

    @PostConstruct
    public void  postConstruct(){
        System.out.println(" PostConstruct 方法");
    }

    @Override
    public void afterPropertiesSet() {
        System.out.println(" InitializingBean 接口 ");
    }
}
